package com.example.demo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Lx on 2018/7/9.
 */
@RestController
@RequestMapping("env")
//刷新配置
@RefreshScope
public class Test {
    @Value("${env}")
    private String env;

    @GetMapping("/girl")
    public String say(){
        System.out.println(env);
        return env;
    }
}
